#include <iostream>
#include <string>
#include "Question.h"
#include "StudentTest.h"

void main3_1_2() {
	Question q;

	q.Read();
	q.Check();
	q.Write();
}

void main3_3() {
	Question q;

	std::cin >> q;
	std::cout << q;
}

void main3_4() {
	Question q1, q2, q3;
	StudentTest st;

	q1.Read();
	q2.Read();
	q3.Read();
	q1.Check();
	q2.Check();
	q3.Check();
	st.Add(q1);
	st.Add(q2);
	st.Add(q3);
	std::cout << st.List();
}

void main3_5() {
	Question q1, q2, q3, q4;
	StudentTest st;

	q1.Read();
	q2.Read();
	q3.Read();
	q4.Read();
	q1.Check();
	q2.Check();
	q3.Check();
	q4.Check();
	st.Add(q1);
	st.Add(q2);
	st.Add(q3);
	st.Add(q4);
	st.WriteToFile();
}

void main3_6() {
	StudentTest st;
	st.ReadFromFile("testdata.txt");
	std::cout << st.List();
}

void main3_7() {
	StudentTest st;
	st.ReadFromFile("testdata.txt");
	std::cout << st.CheckWholeTest() << "% answers right on the test.";
}

int main() {
	//main3_1_2();
	//main3_3();
	//main3_4();
	//main3_5();
	//main3_6();
	main3_7();

	system("pause");
}